package com.example.bean;

import org.apache.flink.api.common.functions.MapFunction;

/**
 * Created with IntelliJ IDEA.
 * ClassName: WaterSenSorFunction
 * Package: com.example.bean
 * Description:
 * User: fzykd
 *
 * @Author: LQH
 * Date: 2023-07-19
 * Time: 16:05
 */

public class WaterSenSorFunction implements MapFunction<String, WaterSensor> {


    @Override
    public WaterSensor map(String value) throws Exception {
        String[] s = value.split(" ");

        return new WaterSensor(s[0],Long.valueOf(s[1]),Integer.valueOf(s[2]));
    }
}
